package com.yunti.springboot.vo.req;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SubjectReq extends PageReq{

    /**  | 表字段 id */
    @NotNull(groups = {SubjectReq.edit.class, SubjectReq.del.class},message = "id不能为空")
    private Integer id;

    /**  | 表字段 name */
    @NotBlank(groups = {SubjectReq.edit.class, SubjectReq.add.class},message = "项目名不能为空")
    private String name;


    /** 1.必修 2.6选2 3.8选2 4.健康监测 | 表字段 type */
    @NotNull(groups = {SubjectReq.edit.class, SubjectReq.add.class},message = "类型不能为空")
    private Integer type;

    /** 1.7年级 2.8年级 3.9年级 | 表字段 year */
    @NotNull(groups = {SubjectReq.edit.class, SubjectReq.add.class},message = "年级不能为空")
    private Integer year;
    public @interface add{};
    public @interface edit{};
    public @interface del{};
}
